# -*- coding = utf-8 -*-
# @Time : 2022/1/19 11:21
# @Author : 龙王赘婿_彪少
# @File : testos.py
# @Software: PyCharm

# 测试os operating system

import os


class Os:
    def __init__(self):
        # self.get_information()
        # self.get_file_from_dir()
        self.del_dir()

    def get_information(self):
        print(os.sep)  # 打印分隔符
        print(os.name) # 工作平台 windows：nt linux：posix
        print(os.getenv('path'))
        print(os.getcwd())

    def del_dir(self):
        # os.mkdir("hello")
        # os.rmdir("hello")
        # os.rename("hello", "happy")
        os.rmdir("happy")


    def get_file_from_dir(self):
        path = "../file"
        files = os.listdir(path)
        for file in files:
            print(file)



if __name__ == "__main__":
    obj = Os()
